package com.leyou.item.service;
import com.leyou.item.entity.Category;
import com.leyou.item.Mapper.CategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryService {


    @Autowired
    private CategoryMapper categoryMapper;

    public List<Category> queryByParentId(Long pid) {

        Category category = new Category();

        category.setParentId(pid);

        List<Category> categoryList = categoryMapper.select(category);



        return categoryList;
    }



}
